<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Private Browser</title>
    <link rel="shortcut icon" href="./imgs/logo.png" type="image/x-icon">
    <script src="./js/vue.js"></script>
    <link rel="stylesheet" href="./css/detail.css">
    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2450260242912246"
        crossorigin="anonymous" data-ad-channel="7634024656"></script>
    <style>
        .gsc-input[name=search] {
            background: none !important;
        }

        #app {
            padding: 0;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>

        <div class="navbar">
            <a class="navbar-back" href="./index.html">
                <img src="./imgs/back.svg" alt="back">
            </a>
            <span class="navbar-title">{{title || detail.title}}</span>
        </div>

        <div class="search">
            <div class="search-ad">
                <search></search>
            </div>
        </div>

        <div class="article">
            <h1 class="article-title">{{detail.title}}</h1>
            <span class="article-sub">{{detail.information}}</span>
            <div class="ad">
                <span>advertisement</span>
                <div class="ad-wrapper">
                    <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2450260242912246"
                        data-ad-slot="8077346977" data-ad-format="auto" data-full-width-responsive="true"></ins>
                </div>
            </div>
            <div id="relatedsearches1" style="margin: 5px 0;"></div>
            <p class="article-content" v-html="detail.blogContent"></p>
        </div>

        <self-menu></self-menu>
    </div>
</body>
<script src="./main.js"></script>
<script type="module">
    import { search, menu } from './components/index.js'
    var vm = new Vue({
        el: '#app',
        components: {
            search,
            selfMenu: menu,
        },
        data() {
            return {
                detail: {},
                title: '',
                id: 903
            }
        },
        created() {
            document.title = decodeURIComponent(getQueryVariable('title'))
            this.title = decodeURIComponent(getQueryVariable('title') ? getQueryVariable('title') : '')
            this.id = getQueryVariable('id') ? getQueryVariable('id') : 903
            this.handleFetchArticleDetail()
        },
        mounted() {
            this.$nextTick(() => {
                window.addAds()
            })
        },
        methods: {
            handleFetchArticleDetail() {
                fetch('https://migame.vip/gamefront/blog/findBlogApiOne', {
                    headers: {
                        'Content-Type': 'application/json; charset=utf-8'
                    },
                    method: 'post',
                    body: JSON.stringify({
                        id: this.id
                    })
                })
                    .then(res => res.json())
                    .then(res => {
                        if (res.code == 0) {
                            this.detail = res.data
                        }
                    })
                    .catch(err => {
                        throw new Error(err)
                    })
            }
        }
    })
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M8Y782V4G7"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());

    gtag('config', 'G-M8Y782V4G7');
</script>

</html>